/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.gov.cemaden.imagefilter.concurrent;

import br.gov.cemaden.imagefilter.filter.ApplyFilter;
import java.nio.file.Path;
import java.util.concurrent.Callable;

    
/**
 *
 * @author Alan
 */
public class FilterCallable implements Callable<Boolean> {

    private String source;
    private String pathTarget;
    private String filename;
    private int option;
    
    public FilterCallable(String source, String pathTarget, String filename, int option){
        this.source = source;
        this.pathTarget = pathTarget;
        this.filename = filename;
        this.option = option;
    }
    
    @Override
    public Boolean call() throws Exception {
        
        if(option == 1)
            return new ApplyFilter(source, pathTarget, filename).applyTransparency();
        else
            return new ApplyFilter(source, pathTarget, filename).justSaveImageWithRGB();
    }   
    
}
